3.1.60 \(\int \frac {a+b x^2}{(c+d x^2) \sqrt {e+f x^2}} \, dx\) [60]

Optimal. Leaf size=91 \[ -\frac {(b c-a d) \tan ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d \sqrt {d e-c f}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}} \]

[Out]

b*arctanh(x*f^(1/2)/(f*x^2+e)^(1/2))/d/f^(1/2)-(-a*d+b*c)*arctan(x*(-c*f+d*e)^(1/2)/c^(1/2)/(f*x^2+e)^(1/2))/d
/c^(1/2)/(-c*f+d*e)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {537, 223, 212, 385, 211} \begin {gather*} \frac {b \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}}-\frac {(b c-a d) \text {ArcTan}\left (\frac {x \sqrt {d e-c f}}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d \sqrt {d e-c f}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)/((c + d*x^2)*Sqrt[e + f*x^2]),x]

[Out]

-(((b*c - a*d)*ArcTan[(Sqrt[d*e - c*f]*x)/(Sqrt[c]*Sqrt[e + f*x^2])])/(Sqrt[c]*d*Sqrt[d*e - c*f])) + (b*ArcTan
h[(Sqrt[f]*x)/Sqrt[e + f*x^2]])/(d*Sqrt[f])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 537

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/b, I
nt[1/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/((a + b*x^n)*Sqrt[c + d*x^n]), x], x] /; FreeQ[{a, b,
 c, d, e, f, n}, x]

Rubi steps

\begin {align*} \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx &=\frac {b \int \frac {1}{\sqrt {e+f x^2}} \, dx}{d}+\frac {(-b c+a d) \int \frac {1}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx}{d}\\ &=\frac {b \text {Subst}\left (\int \frac {1}{1-f x^2} \, dx,x,\frac {x}{\sqrt {e+f x^2}}\right )}{d}+\frac {(-b c+a d) \text {Subst}\left (\int \frac {1}{c-(-d e+c f) x^2} \, dx,x,\frac {x}{\sqrt {e+f x^2}}\right )}{d}\\ &=-\frac {(b c-a d) \tan ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d \sqrt {d e-c f}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d \sqrt {f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.25, size = 111, normalized size = 1.22 \begin {gather*} \frac {\frac {(b c-a d) \tan ^{-1}\left (\frac {c \sqrt {f}+d x \left (\sqrt {f} x-\sqrt {e+f x^2}\right )}{\sqrt {c} \sqrt {d e-c f}}\right )}{\sqrt {c} \sqrt {d e-c f}}-\frac {b \log \left (-\sqrt {f} x+\sqrt {e+f x^2}\right )}{\sqrt {f}}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)/((c + d*x^2)*Sqrt[e + f*x^2]),x]

[Out]

(((b*c - a*d)*ArcTan[(c*Sqrt[f] + d*x*(Sqrt[f]*x - Sqrt[e + f*x^2]))/(Sqrt[c]*Sqrt[d*e - c*f])])/(Sqrt[c]*Sqrt
[d*e - c*f]) - (b*Log[-(Sqrt[f]*x) + Sqrt[e + f*x^2]])/Sqrt[f])/d

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(351\) vs. \(2(75)=150\).
time = 0.11, size = 352, normalized size = 3.87

method result size
default \(\frac {b \ln \left (\sqrt {f}\, x +\sqrt {f \,x^{2}+e}\right )}{d \sqrt {f}}-\frac {\left (a d -b c \right ) \ln \left (\frac {-\frac {2 \left (c f -d e \right )}{d}+\frac {2 f \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x -\frac {\sqrt {-c d}}{d}\right )^{2} f +\frac {2 f \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right )}{d}-\frac {c f -d e}{d}}}{x -\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, d \sqrt {-\frac {c f -d e}{d}}}-\frac {\left (-a d +b c \right ) \ln \left (\frac {-\frac {2 \left (c f -d e \right )}{d}-\frac {2 f \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x +\frac {\sqrt {-c d}}{d}\right )^{2} f -\frac {2 f \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right )}{d}-\frac {c f -d e}{d}}}{x +\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, d \sqrt {-\frac {c f -d e}{d}}}\) \(352\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^(1/2),x,method=_RETURNVERBOSE)

[Out]

b/d*ln(f^(1/2)*x+(f*x^2+e)^(1/2))/f^(1/2)-1/2*(a*d-b*c)/(-c*d)^(1/2)/d/(-(c*f-d*e)/d)^(1/2)*ln((-2*(c*f-d*e)/d
+2*f*(-c*d)^(1/2)/d*(x-(-c*d)^(1/2)/d)+2*(-(c*f-d*e)/d)^(1/2)*((x-(-c*d)^(1/2)/d)^2*f+2*f*(-c*d)^(1/2)/d*(x-(-
c*d)^(1/2)/d)-(c*f-d*e)/d)^(1/2))/(x-(-c*d)^(1/2)/d))-1/2*(-a*d+b*c)/(-c*d)^(1/2)/d/(-(c*f-d*e)/d)^(1/2)*ln((-
2*(c*f-d*e)/d-2*f*(-c*d)^(1/2)/d*(x+(-c*d)^(1/2)/d)+2*(-(c*f-d*e)/d)^(1/2)*((x+(-c*d)^(1/2)/d)^2*f-2*f*(-c*d)^
(1/2)/d*(x+(-c*d)^(1/2)/d)-(c*f-d*e)/d)^(1/2))/(x+(-c*d)^(1/2)/d))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^(1/2),x, algorithm="maxima")

[Out]

integrate((b*x^2 + a)/((d*x^2 + c)*sqrt(f*x^2 + e)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (79) = 158\).
time = 1.73, size = 782, normalized size = 8.59 \begin {gather*} \left [-\frac {\sqrt {c^{2} f - c d e} {\left (b c - a d\right )} f \log \left (\frac {8 \, c^{2} f^{2} x^{4} + 4 \, {\left (2 \, c f x^{3} - {\left (d x^{3} - c x\right )} e\right )} \sqrt {c^{2} f - c d e} \sqrt {f x^{2} + e} + {\left (d^{2} x^{4} - 6 \, c d x^{2} + c^{2}\right )} e^{2} - 8 \, {\left (c d f x^{4} - c^{2} f x^{2}\right )} e}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) - 2 \, {\left (b c^{2} f - b c d e\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{4 \, {\left (c^{2} d f^{2} - c d^{2} f e\right )}}, -\frac {\sqrt {c^{2} f - c d e} {\left (b c - a d\right )} f \log \left (\frac {8 \, c^{2} f^{2} x^{4} + 4 \, {\left (2 \, c f x^{3} - {\left (d x^{3} - c x\right )} e\right )} \sqrt {c^{2} f - c d e} \sqrt {f x^{2} + e} + {\left (d^{2} x^{4} - 6 \, c d x^{2} + c^{2}\right )} e^{2} - 8 \, {\left (c d f x^{4} - c^{2} f x^{2}\right )} e}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) + 4 \, {\left (b c^{2} f - b c d e\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{4 \, {\left (c^{2} d f^{2} - c d^{2} f e\right )}}, \frac {\sqrt {-c^{2} f + c d e} {\left (b c - a d\right )} f \arctan \left (\frac {{\left (2 \, c f x^{2} - {\left (d x^{2} - c\right )} e\right )} \sqrt {-c^{2} f + c d e} \sqrt {f x^{2} + e}}{2 \, {\left (c^{2} f^{2} x^{3} - c d x e^{2} - {\left (c d f x^{3} - c^{2} f x\right )} e\right )}}\right ) + {\left (b c^{2} f - b c d e\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{2 \, {\left (c^{2} d f^{2} - c d^{2} f e\right )}}, \frac {\sqrt {-c^{2} f + c d e} {\left (b c - a d\right )} f \arctan \left (\frac {{\left (2 \, c f x^{2} - {\left (d x^{2} - c\right )} e\right )} \sqrt {-c^{2} f + c d e} \sqrt {f x^{2} + e}}{2 \, {\left (c^{2} f^{2} x^{3} - c d x e^{2} - {\left (c d f x^{3} - c^{2} f x\right )} e\right )}}\right ) - 2 \, {\left (b c^{2} f - b c d e\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{2 \, {\left (c^{2} d f^{2} - c d^{2} f e\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^(1/2),x, algorithm="fricas")

[Out]

[-1/4*(sqrt(c^2*f - c*d*e)*(b*c - a*d)*f*log((8*c^2*f^2*x^4 + 4*(2*c*f*x^3 - (d*x^3 - c*x)*e)*sqrt(c^2*f - c*d
*e)*sqrt(f*x^2 + e) + (d^2*x^4 - 6*c*d*x^2 + c^2)*e^2 - 8*(c*d*f*x^4 - c^2*f*x^2)*e)/(d^2*x^4 + 2*c*d*x^2 + c^
2)) - 2*(b*c^2*f - b*c*d*e)*sqrt(f)*log(-2*f*x^2 - 2*sqrt(f*x^2 + e)*sqrt(f)*x - e))/(c^2*d*f^2 - c*d^2*f*e),
-1/4*(sqrt(c^2*f - c*d*e)*(b*c - a*d)*f*log((8*c^2*f^2*x^4 + 4*(2*c*f*x^3 - (d*x^3 - c*x)*e)*sqrt(c^2*f - c*d*
e)*sqrt(f*x^2 + e) + (d^2*x^4 - 6*c*d*x^2 + c^2)*e^2 - 8*(c*d*f*x^4 - c^2*f*x^2)*e)/(d^2*x^4 + 2*c*d*x^2 + c^2
)) + 4*(b*c^2*f - b*c*d*e)*sqrt(-f)*arctan(sqrt(-f)*x/sqrt(f*x^2 + e)))/(c^2*d*f^2 - c*d^2*f*e), 1/2*(sqrt(-c^
2*f + c*d*e)*(b*c - a*d)*f*arctan(1/2*(2*c*f*x^2 - (d*x^2 - c)*e)*sqrt(-c^2*f + c*d*e)*sqrt(f*x^2 + e)/(c^2*f^
2*x^3 - c*d*x*e^2 - (c*d*f*x^3 - c^2*f*x)*e)) + (b*c^2*f - b*c*d*e)*sqrt(f)*log(-2*f*x^2 - 2*sqrt(f*x^2 + e)*s
qrt(f)*x - e))/(c^2*d*f^2 - c*d^2*f*e), 1/2*(sqrt(-c^2*f + c*d*e)*(b*c - a*d)*f*arctan(1/2*(2*c*f*x^2 - (d*x^2
 - c)*e)*sqrt(-c^2*f + c*d*e)*sqrt(f*x^2 + e)/(c^2*f^2*x^3 - c*d*x*e^2 - (c*d*f*x^3 - c^2*f*x)*e)) - 2*(b*c^2*
f - b*c*d*e)*sqrt(-f)*arctan(sqrt(-f)*x/sqrt(f*x^2 + e)))/(c^2*d*f^2 - c*d^2*f*e)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b x^{2}}{\left (c + d x^{2}\right ) \sqrt {e + f x^{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)/(d*x**2+c)/(f*x**2+e)**(1/2),x)

[Out]

Integral((a + b*x**2)/((c + d*x**2)*sqrt(e + f*x**2)), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/(d*x^2+c)/(f*x^2+e)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:index.cc index_m i_lex_is_greater Error: Bad Argument Value

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {b\,x^2+a}{\left (d\,x^2+c\right )\,\sqrt {f\,x^2+e}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)/((c + d*x^2)*(e + f*x^2)^(1/2)),x)

[Out]

int((a + b*x^2)/((c + d*x^2)*(e + f*x^2)^(1/2)), x)

________________________________________________________________________________________